package com.ian.client;

import com.ian.client.fallback.OrderServiceClientFallBack;
import com.ian.dto.OrderDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.Map;

@FeignClient(value = "order-service", fallback = OrderServiceClientFallBack.class)
public interface OrderServiceClient {
    @PostMapping("/createorder")
    public Map order(@RequestBody OrderDTO orderDTO);
}
